import { Column, Entity } from 'typeorm';
import { BaseEntity } from './BaseEntity';

@Entity()
export class SysDict extends BaseEntity {
  @Column({
    unique: true,
    type: 'varchar',
    comment: '字典唯一key'
  })
  code: string;

  @Column({
    type: 'varchar',
    nullable: true,
    comment: '字典名称'
  })
  name: string;

  @Column({
    default: false,
    type: 'boolean',
    comment: '是否禁用'
  })
  forbidden: boolean;

  @Column({
    default: false,
    type: 'boolean',
    comment: '是否启动缓存'
  })
  cache: boolean;

  /**
   * 备注
   *
   * @type {string}
   * @memberof User
   */
  @Column({ nullable: true, type: 'varchar', comment: '备注' })
  remark: string;
}
